Page({

  /**
   * 页面的初始数据
   */
  data: {
    List:[{
      title:"图片",
      name:"列表"
    }, {
        title: "图片",
        name: "添加"
      }, {
        title: "分类",
        name: "添加"
      }, {
        title: "分类",
        name: "列表"
      }]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },
  bindItem:function(e){
    var index = JSON.stringify(e.currentTarget.dataset.index)
    console.log("index==="+index)
    var url=""
    switch (index){
      case "0":
        url = "/pages/admin/list"
      break
      case "1":
        url ="/pages/admin/data"
      break
      case "2":
        url ="/pages/admin/addSort"
      break
      case "3":
        url = "/pages/admin/sortList"
      break
    }
    console.log("url===="+url)
    wx.navigateTo({
      url: url,
    })
  }
})